// 1. alloc
let buf = Buffer.alloc(10);
// console.log(buf)
// 2. allocUnsafe 创建快，但会缓存程序上一次运行
let buf_2 = Buffer.allocUnsafe(10)
// console.log(buf_2)
// 3. from 可以把字符串或者数组 转换成 buffer
let buf_3 = Buffer.from('hello world')
const buf4 = Buffer.from([105,108,111,118,101,121,111,117])
console.log(buf_3,buf_4)